This application is based on Application No. 2002-025169, filed in Japan on Feb. 1, 2002, the contents of which are hereby incorporated by reference.
1. Field of the Invention
The present invention relates to a data holding device which stores the state of an internal combustion engine installed on a vehicle or the like.
2. Description of the Prior Art
FIG. 4 is a block diagram which shows a known data holding device 1A of an internal combustion engine. FIG. 5 is a flow chart which shows the operation of the known data holding device 1A of an internal combustion engine.
In FIG. 4, the data holding device 1A includes a CPU 11A and an EEPROM 12. A switch 2 and an external power supply 3 are connected to the CPU 11A.
The switch 2 is always turned on when the internal combustion engine (not shown) is normal, but it is turned off momentarily when the engine becomes abnormal. Here, note that for instance, the switch 2 is turned off owing to abnormality resulting from wear on belts in the internal combustion engine.
In FIG. 5, the CPU 11A determines the state of the internal combustion engine from the state of the switch 2 (step S501), and stores one piece of recognized data corresponding to the result of the determination in a RAM (not shown) which is connected to the CPU 11A.
That is, if it is determined in step S501 that there is abnormality (that is, YES), the recognized data of xe2x80x9cabnormalityxe2x80x9d is set to the RAM (step S502), whereas if determined as normal in step S501 (that is, NO), the recognized data of xe2x80x9cnormalityxe2x80x9d is set to the RAM (step S503).
Subsequently, the CPU 11A always monitors the voltage of the external power supply 3 (power supply voltage), and determines whether the power supply voltage is equal to or more than a prescribed value (step S504).
If it is determined in step S504 that the power supply voltagexe2x89xa7the prescribed value (that is, YES), the recognized data of xe2x80x9cabnormalityxe2x80x9d stored in the RAM is stored in a prescribed position of the EEPROM 12 (step S505), whereas if determined as the power supply voltage less than the prescribed value (that is, NO), the step S505 is skipped.
Here, note that the recognized data of xe2x80x9cnormalityxe2x80x9d is stored in the EEPROM 12 as an initial value.
Then, a determination is made as to whether the recognized data in the EEPROM 12 is xe2x80x9cabnormalityxe2x80x9d (step S506). If the recognized data is xe2x80x9cabnormalityxe2x80x9d (that is, YES), it is determined as xe2x80x9cthere being abnormality in the internal combustion enginexe2x80x9d (step S507), whereas if determined as xe2x80x9cnormalityxe2x80x9d (that is, NO), it is determined as xe2x80x9cthe internal combustion engine being normalxe2x80x9d (step S508), and the processing routine of FIG. 5 is ended.
Here, note that when processing (not shown) such as various kinds of MAP retrievals or the like necessary to control the internal combustion engine after the ending of the processing routine of FIG. 5, a return to step S501 is carried out and the monitoring of abnormality is continued.
The recognized data stored in the EEPROM 12 in step S505 is continuously kept stored without being lost even if the supply of power to the data holding device is stopped or cut off. Therefore, if the prescribed position in the EEPROM 12 is referred to when the supply of power is restarted, the CPU can know the state of the internal combustion engine before the re-starting of the power supply.
Accordingly, since the known data holding device 1A of the internal combustion engine determines an abnormal state of the internal combustion engine based on the recognized data stored in the EEPROM 12, as described above, the reliability of the recognized data in the EEPROM 12 becomes important. Thus, there arises the following problem. That is, the voltage of the external power supply 3 varies greatly and hence the defective writing of recognized data would be caused by such a variation in the power supply voltage, so an incorrect determination of xe2x80x9cabnormalityxe2x80x9d might be made though the internal combustion engine is in fact normal, thus affecting other controls.
The present invention is intended to solve the problem as referred to above, and has for its object to provide a data holding device of an internal combustion engine which is capable of improving the reliability of recognized data stored in a data storage element (e.g., an EEPROM).
Bearing the above object in mind, the present invention resides in a data holding device of an internal combustion engine which includes a switch which is adapted to be turned on and off in accordance with a state of the internal combustion engine, a control element in the form of a CPU for determining the presence or absence of abnormality in the internal combustion engine based on a state of the switch, a data storage element in the form of an EEPROM for storing recognized data corresponding to the presence or absence of abnormality, an external power supply which supplies a power supply voltage to the control element, and a voltage holding circuit for holding the power supply voltage at a prescribed value for a period of time during which the recognized data is being stored into the data storage element. When abnormality is found in the internal combustion engine, the control element makes a plurality of pieces of recognized data indicative of abnormality stored into the data storage element, and at the same time the state of the internal combustion engine is determined based on groups of recognized data stored in the data storage element.
According to such a configuration, it is possible to prevent defective writing of data into the data storage element such as an EEPROM, which would otherwise be caused by a variation in the voltage of the external power supply, as a consequence of which erroneous or incorrect control due to defective data can be avoided.
The above and other objects, features and advantages of the present invention will become more readily apparent to those skilled in the art from the following detailed description of preferred embodiments of the present invention taken in conjunction with the accompanying drawings.